<%@ page  contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="page" uri="http://www.forten.org/taglib/page"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="forten" uri="http://www.forten.org/taglib/forten"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="../styles/css/reset.css">
<link type="text/css" rel="stylesheet" href="../styles/css/index.css">
<script type="text/javascript" src="../scripts/html5.js"></script>
<!-- end -->
<title>课程附件管理</title>
<style type="text/css">
.well
{
	background-color: #F5F5F5;
    border: 1px solid #E3E3E3;
    border-radius: 4px 4px 4px 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) inset;
    margin-bottom: 20px;
    min-height: 20px;
    padding: 19px;
}
</style>
</head>

<script type="text/javascript">
function doDelete(id,courseId){
	if(confirm("您正在删除以上传的课件信息，您确认删除吗？")){
		window.location.href="deleteCourseware.jspx?id="+id+"&courseId="+courseId;
	}
}
</script>

<body>
	<c:if test="${! empty message }">
		<script type="text/javascript" language="javascript">
		 window.onload =function(){
			 var message = "${message}";
			 alert(message);
		 }
		</script>
	</c:if>
<header>
	<div class="headerWrap"></div>
	</header>

 <div class="content">

		<section>
  <br>
  <c:if test="${coursewareDtos.size() ==0 }">
  <div class="well">
  	<h3 style="font-size: 20px;line-height: 35px">该课程还未上传课件，请返回上一页进行课件上传操作！</h3>
  </div>	
  </c:if>
  <c:if test="${coursewareDtos.size() >0 }">
  	<div class="rc_info mt20">
		<h3>
			<span class="r_title_ico"></span>课程附件信息
		</h3>
    </div>
    <form action="deleteCourseware.jspx" name="frm" id="frm">
    <%-- <forten:token name="deleteCourseware"></forten:token> --%>
  	<table class="rc_tab01" cellspacing="0" cellpadding="0">
  		<tr>
  			<th style="text-align: center;width: 10%">序号</th>
  			<th style="text-align: center;width: 40">附件名称</th>
  			<th style="text-align: center;">附件上传时间</th>
  			<th style="text-align: center;">附件大小</th>
  			<th style="text-align: center;width: 15%">操作</th>
  		</tr>
  	<c:forEach items="${coursewareDtos }" var="coursewareDto" varStatus="s">
  		<tr id="${coursewareDto.id}">
  		<td style="text-align: center;">${s.index+1 }</td>
  		<td style="text-align: center;">${coursewareDto.wareName }</td>
  		<td style="text-align: center;">${coursewareDto.czsj}</td>
  		<td style="text-align: center;">${coursewareDto.fileSize}</td>
  		<td style="text-align: center;"><a onclick="doDelete('${coursewareDto.id}','${courseId}');">删除</a></td>
  		
  		</tr>
  	</c:forEach>
  	</table>
  	</form>
  </c:if>
  
  <br>
  <a href="gotoUploadCourseware.jspx?courseId=${courseId }" class="btn mt7"><span>返回上一页</span></a>
  </section>
 </div> 
  
<%@include file="/common/foot.jsp"%>